package com.bgybmi.entity;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

public class BxCreate extends Model<BxCreate>{

	private static final long serialVersionUID = -503838622896045124L;//用于序列化和反序列化
	
	public static final BxCreate me = new BxCreate();
	
	private static final String tablename="bx_create";
	
	//可以封装到Map中统一读取。做个统一管理
	
	//base model finish
	
	//get What you need custom
	
	//getOneValue
		
	//named list_name reference by al
	public List<BxCreate> listAllByUser(String user){
		return me.find(CommonStatic.listByUser(tablename,"cjr"),user);
	}
	
	public List<BxCreate> listAllByParam(String paramField,String paramValue){
		return me.find(CommonStatic.listByParam(tablename,paramField),paramValue);
	}
	
	/**
	 * @param conditon where's sub clause
	 * @param user
	 * @return
	 */
	public List<BxCreate> listAllByParamAndUser(String conditon,String user){
		System.out.println(CommonStatic.listAllByContitionAndUser(tablename,conditon,"bxr"));
		return me.find(CommonStatic.listAllByContitionAndUser(tablename,conditon,"bxr"),user);
	}
	
}
